<template>
  <Card :option="option" />
</template>

<script setup>
import { defineAsyncComponent, reactive,watch,ref } from 'vue'


// 引入组件
const Card = defineAsyncComponent(() => import('./card.vue'))
const props = defineProps({
  Data: {
    type: Object,
    default: '',
  }
})
const option = ref({})
const Data = ref({});
watch(() => props.Data, () => {
  Data.value = props.Data;
  option.value = {
  type: 2,
  title: '已成交订单统计',
  total: Data.value.TolDealNum,
  totalName: '总成交',
  tips: '所有已发货订单的正常完结的订单数量总和，包括已买断、已归还、已续租、逾期强制买断的完结订单',
  children: [
    {
      label: '待发货',
      data: Data.value.WaitSendNum,
      tips: '当前处于待发货状态的订单数量总和',
    },
    {
      label: '待收货',
      data: Data.value.WaitReceivedNum,
      tips: '当前处于待收货状态的订单数量总和',
    },
    {
      label: '租赁中',
      data: Data.value.InLeaseNum,
      tips: '当前处于租赁中的订单数量总和',
    },
    {
      label: '归还中',
      data: Data.value.ReturningNum,
      tips: '当前处于归还中的订单数量总和',
    },
    {
      label: '已完结',
      data: Data.value.CompletedNum,
      tips: '当前处于已完结状态的订单数量总和。完结类型为正常完结包括已买断、已归还、已续租、逾期强制买断',
    },
    {
      label: '逾期中',
      data: Data.value.BeOverdueNum,
      tips: '当前处于逾期中且逾期天数≥1，已剔除逾期后已还款或已完结的订单',
    },
  ],
}
})
</script>
